<template>
  <div class="memberDetail">
    <van-nav-bar :title="`${memberName || '成员'} 信息`" left-text="返回" left-arrow @click-left="router.back()" />
    <!-- 成员信息面板 -->
    <div class="header-content">
      <!-- 用户信息 -->
      <div class="user-info">
        <div class="user-name">用户名</div>
        <div class="user-family">家庭</div>
      </div>
    </div>
    {{ memberId }}
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { useRouter } from 'vue-router'

const router = useRouter()

// memberId
const memberId = router.currentRoute.value.params?.id;
const memberName = ref<string>('');



</script>

<style scoped>
.header-content {
  display: flex;
  justify-content: left;
  align-items: center;
  height:90px;
  padding: 20px;
  background-color: #EBEEF5;
}
.user-info {
  margin-left: 20px;
}
.user-info .user-name {
  font-size: 25px;
  font-weight: bold;
}
.user-info .user-family {
  margin-top: 10px;
  color: #999;
}
.logout {
  position: absolute;
  right: 20px;
  top: 20px;
}
.content {
  font-size: 20px;
}
.content-item {
  padding: 16px 20px;
  border-bottom: 1px solid #EBEEF5;
  position: relative;
}
.content-item:first-child {
  border-top: 1px solid #EBEEF5;
}
.content-item span {
  position: absolute;
  right: 20px;
}
.content-item:hover {
  background-color: #F5F7FA;
  cursor: pointer;
}
</style>